package com.lzw.controller;

import com.lzw.domain.dto.SQLFormat;
import com.lzw.domain.vo.ResponseVO;
import com.lzw.service.Line2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin(origins = "*")
public class Line2Controller {

    @Autowired
    private Line2Service line2Service;

    @PostMapping("/get")
    public ResponseVO getProcedureMsg(@RequestParam("procedureName") String procedureName) {
        ResponseVO responseVO = line2Service.getMsg(procedureName);
        return responseVO;
    }

    @PostMapping("/get15day")
    public List<ResponseVO> get15dayProcedureMsg(@RequestParam("procedureName") String procedureName) {
        List<ResponseVO> list = line2Service.get15dayMsg(procedureName);
        return list;
    }

}
